import request from '@/utils/request'
export default {
    //1 添加课程信息
    addCourseInfo(courseInfo) {
        return request({
            url: '/edu/course/add',
            method: 'post',
            data:courseInfo
          })
    },
    //2 查询所有讲师
    getListTeacher() {
        return request({
            url: '/edu/teacher/get/all',
            method: 'get'
          })
    },
    //根据课程id查询课程基本信息
    getCourseInfoId(id) {
      return request({
        url: '/edu/course/get/'+id,
        method: 'get'
      })
    },
    //修改课程信息
    updateCourseInfo(courseInfo) {
      return request({
        url: '/edu/course/update',
        method: 'post',
        data: courseInfo
      })
    },
    //课程确认信息显示
    getPublihCourseInfo(id) {
      return request({
        url: '/edu/course/get/publish/course/info/'+id,
        method: 'get'
      })
    },
    //课程最终发布
    publihCourse(id) {
      return request({
        url: '/edu/course/publish/'+id,
        method: 'post'
      })
    },
    //获取课程列表
    getListCourse(){
      return request({
          url: '/edu/course/get/list',
          method: 'get'
      })
    },
    deleteCourseById(id){
      return request({
        url: '/edu/course/delete/'+ id,
        method: 'delete'
      })
    }

}
